﻿using Newtonsoft.Json;
using ZilLion.Service.Core.Domain.EntityBase;
using ZilLion.Service.ZilLionOss.Domain.Entitys;

namespace ZilLion.Service.ZilLionOss.Domain.Responses
{
    public class BasicUserInfoDto
    {
        /// <summary>
        ///     用户名
        /// </summary>
        [JsonProperty("username")]
        public string UserName { get; set; }

        /// <summary>
        ///     手机号
        /// </summary>
        [JsonProperty("userphoneno")]
        public long UserPhoneNo { get; set; }

        /// <summary>
        ///     用户ID
        /// </summary>
        [JsonProperty("userid")]
        public long UserId { get; set; }

        /// <summary>
        ///     用户头像
        /// </summary>
        [JsonProperty("useravatar")]
        public string UserAvatar { get; set; }

        /// <summary>
        ///     用户昵称
        /// </summary>
        [JsonProperty("usernickname")]
        public string UserNickName { get; set; }


        /// <summary>
        ///     是否是超级管理员
        /// </summary>
        [JsonProperty("isadmin")]
        public bool IsAdmin { get; set; }
    }

    public class UserCompleteInfoDto : BasicUserInfoDto
    {
        /// <summary>
        ///     所属岗位
        /// </summary>
        [JsonProperty("userroles")]
        public OssRoleEntity[] UserRoles { get; set; }

        /// <summary>
        ///     路由信息(包含层次)
        /// </summary>
        [JsonProperty("remoteroutes")]
        public OssRouteInfoEntity[] Remoteroutes { get; set; }


        /// <summary>
        /// </summary>
        [JsonProperty("authroutepaths")]
        public string[] AuthRoutePaths { get; set; }
    }


    public class BasicUserInfoResponse : ResponseBase
    {
        [JsonProperty("user")]
        public BasicUserInfoDto User { get; set; }
    }

    public class UserCompleteInfoResponse : ResponseBase
    {
        [JsonProperty("user")]
        public UserCompleteInfoDto User { get; set; }
    }
}